home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!ts14-03
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: BC++45 Class Question
- Date: Sat, 16 Mar 96 08:33:33 GMT
- Organization: MiddleWorld SoftWare
- Message-ID: <4idudf$pc1@sam.inforamp.net>
- References: <4ic1r8$r1c@news1.infinet.com>
- NNTP-Posting-Host: ts14-03.tor.inforamp.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <4ic1r8$r1c@news1.infinet.com>,
- cedwards@infinet.com (Chad Edwards) wrote:
- >TDrawView is of TFileView.
- >What I want to do, is set the dirty flag to true when this function is
- >executed. However, the SetDirty function is of another class.
- >Is there a way to do this?
-
- TFileView? Anyhow, if you have a TView (or a class derived from TView), then
- you simply
-
- class TDrawView : public TView (or a class derived from TView)
- {
- ..
- };
-
- TMyView::CmAdd()
- {
- GetDocument().SetDirty();
- ...
- };
-
- class TMyDoc : public TDocument
- {
- ..
- public:
- void SetDirty();
- };
-
- TMyDoc::SetDirty()
- {
- DirtyFlag = true;
- };
-
- I hope this helps.
-
- Agrivar
-